package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the BBC_KNOWLEDGE database table.
 * 
 */
@Entity
@Table(name="BBC_KNOWLEDGE")
@NamedQuery(name="BbcKnowledge.findAll", query="SELECT b FROM BbcKnowledge b")
public class BbcKnowledge implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="BBC_KNOWLEDGE_BBCKNOWID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="BBC_KNOWLEDGE_BBCKNOWID_GENERATOR")
	@Column(name="BBCKNOW_ID")
	private long bbcknowId;

	@Column(name="ADMINISTRATOR_FOR")
	private BigDecimal administratorFor;

	@Column(name="ALLOW_FOCUS")
	private BigDecimal allowFocus;

	@Column(name="BBCKNOW_ARTICLE")
	private BigDecimal bbcknowArticle;

	@Column(name="BBCKNOW_CLOSE")
	private BigDecimal bbcknowClose;

	@Temporal(TemporalType.DATE)
	@Column(name="BBCKNOW_CREATORDATE")
	private Date bbcknowCreatordate;

	@Column(name="BBCKNOW_EXPLAIN")
	private String bbcknowExplain;

	@Column(name="BBCKNOW_NAME")
	private String bbcknowName;

	@Column(name="BBCKNOW_SYSTEM")
	private BigDecimal bbcknowSystem;

	@Temporal(TemporalType.DATE)
	@Column(name="BBCKNOW_UPDATEDATE")
	private Date bbcknowUpdatedate;

	@Column(name="CHANNEL_NUMBER")
	private BigDecimal channelNumber;

	@Column(name="CHANNEL_TYPE")
	private String channelType;

	@Column(name="COMMON_USE")
	private BigDecimal commonUse;

	@Column(name="LIMITED_VIEW")
	private BigDecimal limitedView;

	@Column(name="MIN_NUMBER")
	private BigDecimal minNumber;

	@Column(name="NUMBER_FOLLOWERS")
	private BigDecimal numberFollowers;

	@Column(name="QUESTION_ANSWERS")
	private BigDecimal questionAnswers;

	@Column(name="RESTRICTED_NEW")
	private BigDecimal restrictedNew;

	//bi-directional many-to-one association to KnowledgeLabel
	@OneToMany(mappedBy="bbcKnowledge")
	@JSONField(serialize=false)
	private List<KnowledgeLabel> knowledgeLabels;

	public BbcKnowledge() {
	}

	public long getBbcknowId() {
		return this.bbcknowId;
	}

	public void setBbcknowId(long bbcknowId) {
		this.bbcknowId = bbcknowId;
	}

	public BigDecimal getAdministratorFor() {
		return this.administratorFor;
	}

	public void setAdministratorFor(BigDecimal administratorFor) {
		this.administratorFor = administratorFor;
	}

	public BigDecimal getAllowFocus() {
		return this.allowFocus;
	}

	public void setAllowFocus(BigDecimal allowFocus) {
		this.allowFocus = allowFocus;
	}

	public BigDecimal getBbcknowArticle() {
		return this.bbcknowArticle;
	}

	public void setBbcknowArticle(BigDecimal bbcknowArticle) {
		this.bbcknowArticle = bbcknowArticle;
	}

	public BigDecimal getBbcknowClose() {
		return this.bbcknowClose;
	}

	public void setBbcknowClose(BigDecimal bbcknowClose) {
		this.bbcknowClose = bbcknowClose;
	}

	public Date getBbcknowCreatordate() {
		return this.bbcknowCreatordate;
	}

	public void setBbcknowCreatordate(Date bbcknowCreatordate) {
		this.bbcknowCreatordate = bbcknowCreatordate;
	}

	public String getBbcknowExplain() {
		return this.bbcknowExplain;
	}

	public void setBbcknowExplain(String bbcknowExplain) {
		this.bbcknowExplain = bbcknowExplain;
	}

	public String getBbcknowName() {
		return this.bbcknowName;
	}

	public void setBbcknowName(String bbcknowName) {
		this.bbcknowName = bbcknowName;
	}

	public BigDecimal getBbcknowSystem() {
		return this.bbcknowSystem;
	}

	public void setBbcknowSystem(BigDecimal bbcknowSystem) {
		this.bbcknowSystem = bbcknowSystem;
	}

	public Date getBbcknowUpdatedate() {
		return this.bbcknowUpdatedate;
	}

	public void setBbcknowUpdatedate(Date bbcknowUpdatedate) {
		this.bbcknowUpdatedate = bbcknowUpdatedate;
	}

	public BigDecimal getChannelNumber() {
		return this.channelNumber;
	}

	public void setChannelNumber(BigDecimal channelNumber) {
		this.channelNumber = channelNumber;
	}

	public String getChannelType() {
		return this.channelType;
	}

	public void setChannelType(String channelType) {
		this.channelType = channelType;
	}

	public BigDecimal getCommonUse() {
		return this.commonUse;
	}

	public void setCommonUse(BigDecimal commonUse) {
		this.commonUse = commonUse;
	}

	public BigDecimal getLimitedView() {
		return this.limitedView;
	}

	public void setLimitedView(BigDecimal limitedView) {
		this.limitedView = limitedView;
	}

	public BigDecimal getMinNumber() {
		return this.minNumber;
	}

	public void setMinNumber(BigDecimal minNumber) {
		this.minNumber = minNumber;
	}

	public BigDecimal getNumberFollowers() {
		return this.numberFollowers;
	}

	public void setNumberFollowers(BigDecimal numberFollowers) {
		this.numberFollowers = numberFollowers;
	}

	public BigDecimal getQuestionAnswers() {
		return this.questionAnswers;
	}

	public void setQuestionAnswers(BigDecimal questionAnswers) {
		this.questionAnswers = questionAnswers;
	}

	public BigDecimal getRestrictedNew() {
		return this.restrictedNew;
	}

	public void setRestrictedNew(BigDecimal restrictedNew) {
		this.restrictedNew = restrictedNew;
	}

	public List<KnowledgeLabel> getKnowledgeLabels() {
		return this.knowledgeLabels;
	}

	public void setKnowledgeLabels(List<KnowledgeLabel> knowledgeLabels) {
		this.knowledgeLabels = knowledgeLabels;
	}

	public KnowledgeLabel addKnowledgeLabel(KnowledgeLabel knowledgeLabel) {
		getKnowledgeLabels().add(knowledgeLabel);
		knowledgeLabel.setBbcKnowledge(this);

		return knowledgeLabel;
	}

	public KnowledgeLabel removeKnowledgeLabel(KnowledgeLabel knowledgeLabel) {
		getKnowledgeLabels().remove(knowledgeLabel);
		knowledgeLabel.setBbcKnowledge(null);

		return knowledgeLabel;
	}

}